{extend name="base" /}
{block name="content"}
<div class="g-main">
    <div class="m-main-title">
        <div class="m-container-fluid">
            <a href="{:url('index/welcome')}"><i class="icon icon-home"></i>首页</a>
            <span class="icon-angle-right"></span>
            <span>系统</span>
            <span class="icon-angle-right"></span>
            <span>公告管理</span>
            <span class="icon-angle-right"></span>
            <span>平台介绍</span>
            <a class="u-flush"><i class="icon-repeat"></i></a>
        </div>
    </div>
    <div class="m-main-content">
        <div class="m-container">
            <div class="m-form">
                <form class="layui-form">
                    <table class="m-table">
                        <thead>
                        <tr>
                            <th colspan="2">平台介绍</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <input type="hidden" name="type" id="type" value="1">
                            <td width="15%"><label for="title">标题<em>*</em></label></td>
                            <td><input type="text" class="u-ipt u-ipt-long" name="title" id="title" placeholder="请输入平台消息标题" value="{$info.title}" /></td>
                        </tr>
                        <tr>
                            <td width="15%"><label for="describe">内容</label></td>
                            <td> <textarea name="content" id="content" style="width:100%;height:300px;" >{$info.content}</textarea></td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="m-form-btn"> <button  class="u-btn" lay-submit lay-filter="formDemo">确定提交</button></div>
                </form>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="extrajs"}
{include file="public:editor"/}
<script>
    UE.getEditor('content');

    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function(data){

            $.post("{:url('saveIntroduce')}",{
                content:data.field.content,
                title:data.field.title,
                type:data.field.type
            },function (res) {
                layer.alert(res.message);
            })
            return false;
        });
    });
</script>
{/block}